doctype html
html(lang="zh-CN")
	head
		meta(charset="utf-8")
		meta(name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no")
		link(rel="stylesheet" href="./styles.css")
	body
		nav.navbar.navbar-inverse.navbar-fixed-top(
			v-if="!['connections'].includes($route.name)"
		)
			.container
				.row
					.col-md-12
						.navbar-header
							a.navbar-brand(v-link="{name: 'index'}") aria2UI
						ul.nav.navbar-nav
							li.dropdown(
								v-bind:class="{active: ['add'].includes($route.name)}"
							)
								a(v-link="{name: 'add'}") 添加
							li.dropdown(
								v-bind:class="{'open': open}"
								@click="open=!open"
								v-show="['index'].includes($route.name)"
							)
								a.dropdown-toggle
									| 操作
									span.caret
								
								ul.dropdown-menu
									mixin li(text, onclick)
										li
											a(href="#" @click=`${onclick}()`) #{text}
									+li('暂停所有', 'pauseAll')
									+li('恢复下载', 'unpauseAll')
									+li('清除已完成', 'removeAllComplete')
									+li('关闭服务器', 'shutdown')
							
						ul.nav.navbar-nav.pull-right
							li.dropdown(
								v-bind:class=`
									{active: this.$route.path.startsWith('/setting')}
								`
							)
								a(
									v-link="{name: 'setting.connect'}"
									style="padding-right: 0px"
								)
									| 设置 &nbsp;
									i.fa.fa-cog.fa-fw
		#main.container
			router-view
		p
		script(src="./dll.js")
